import { createRouter, createWebHistory } from 'vue-router'
import indexView from '../views/home/index.vue'
import shouyeView from '../views/home/shouye/index.vue'
import fenleiView from '../views/home/fenlei/index.vue'
import gouwucheView from '../views/home/gouwuche/index.vue'
import wodeView from '../views/home/wode/index.vue'
import sousuoView from '../views/home/sousuo/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/index/shouye' },
    {
      path: '/index',component: indexView,children:
      [
        {path: 'shouye',component: shouyeView,},
        {path: 'fenlei',component: fenleiView,},
        {path: 'gouwuche',component: gouwucheView,},
        {path: 'wode',component: wodeView,}
      ]
    },
    {path: '/sousuo',component: sousuoView,}
  ],
})

export default router
